package com.lkm.app_ui.ui;

import android.app.ActivityGroup;
import android.app.LocalActivityManager;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.LinearLayout;

import com.lkm.app_ui.R;



public class MainActivityGroup extends ActivityGroup {
    private LinearLayout lo1, lo2;

    LocalActivityManager lam = getLocalActivityManager();

    public void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main_group);

        lo1 = (LinearLayout) findViewById(R.id.lo1);
        lo2 = (LinearLayout) findViewById(R.id.lo2);
        start_activity();

    }

    public static Window win1;
    public void start_activity(){


          win1 = lam.startActivity("0",
                new Intent(this, MainActivity.class));
        View view1 = win1.getDecorView();
        lo1.addView(view1);
        Window win2 = lam.startActivity("1",
                new Intent(this, Main1Activity.class));
        View view2 = win2.getDecorView();
        lo2.addView(view2);

    }
}
